import api from './call'
import { renderUrl } from './config'

/** *
 * *公共模块
 * begin
 ***/

/***
 * 变压器经济分析
 * begin
 ***/
export const electrictransformXHR = async (apiUrl,params,type = 'get') => {
    return api[type](`${renderUrl('substationoperation')}/substationoperation/transformerQualityAnalysis/${apiUrl}`,params).then(res => res.result)
  }
  /***
 * 变压器经济分析 集团账号 获取其下门店的用能id
 * begin
 ***/
export const getCustListXHR = async (apiUrl,params,type = 'get') => {
  return api[type](`${renderUrl('panoramahall')}/panoramahall/electricityBill/${apiUrl}`,params).then(res => res)
}
 /***
 * 
变压器经济分析负荷曲线图
 * begin
 ***/ 
export const loadAnalysisListXHR = async (apiUrl,params,type = 'get') => {
  return api[type](`${renderUrl('substationoperation')}/substationoperation/transformerQualityAnalysis/${apiUrl}`,params).then(res => res.result)
}
/***
 * 变压器经济分析/客户变压器负载时长百分比
 * begin
 ***/
export const loadTimePercentageXHR = async (apiUrl,params,type = 'get') => {
  return api[type](`${renderUrl('substationoperation')}/substationoperation/transformerQualityAnalysis/${apiUrl}`,params).then(res => res.result)
}
/***
 * 变压器经济分析/客户custId获取
 * begin
 ***/
export const getCustInfoXHR = async (apiUrl,params,type = 'get') => {
  return api[type](`${renderUrl('panoramahall')}/panoramahall/electricityBill/${apiUrl}`,params).then(res => res.result)
}
  /***
 * 用电使用监测 
 * begin
 ***/
export const realtimemonitorXHR = async (apiUrl,params,type = 'get') => {
    return api[type](`${renderUrl('realtimemonitor')}/realtimemonitor/powerUsage/${apiUrl}`,params).then(res => res.result)
  }
   /***
 * 用电使用监测 树结构接口
 * begin
 ***/
export const realtimemonitortreeXHR = async (apiUrl,params,type = 'get') => {
    return api[type](`${renderUrl('profile')}/profile/myHome/customerArchives/useEnergyArchives/customerEnergyArchivesTree/myInformation/${apiUrl}`,params).then(res => res.result)
  }

   /***
  * 电量电费分析明细 接口
 * begin
 ***/
export const datailmemonitorXHR = async (apiUrl,params,type = 'get') => {
    return api[type](`${renderUrl('panoramahall')}/panoramahall/electricityBill/${apiUrl}`,params).then(res => res)
  }

    /***
  * 个人中心 我的资料 资质信息
 * begin
 ***/
export const inviContainerXHR = async (apiUrl,params,type = 'get') => {
  return api[type](`${renderUrl('profile')}/profile/personalCenter/myInformation/${apiUrl}`,params).then(res => res)
}

 /***
  * 个人中心 密码设置
 * begin
 ***/
export const passwordXHR = async (apiUrl,params,type = 'get') => {
  return api[type](`${renderUrl('systemmanagement')}/systemmanagement/auth/pwd/${apiUrl}`,params).then(res => res)
}

/***
  * 个人中心 上传图片
 * begin
 ***/
export const onloadXHR = async (apiUrl,params,type = 'get') => {
  return api[type](`${renderUrl('utiltools')}/support/file/${apiUrl}`,params).then(res => res)
}

// 获取导航列表
export const getNavList = async (apiUrl,params,type = 'get') => {
    return api[type](`${renderUrl('systemmanagement')}/systemmanagement/auth/mymenu/list`,params).then(res => res)
}
// 获取字典项
